@extends('user._layouts.default')

@section('css')
    {{HTML::style('user/css/base.css')}}
@stop

@section('user-main')
<div style="font-size: 25px;">{{{$title or ''}}}</div>
<hr/>


  @if(Session::has('message'))
      <div class="am-alert am-alert-{{Session::get('message')['type']}} am-margin am-text-center" data-am-alert>{{Session::get('message')['content']}}</div>
  @endif
  @if($errors->has())
      <div class="am-alert am-alert-danger am-margin am-text-center" data-am-alert>{{$errors->first()}}</div>
  @endif
  {{Form::open(array('url'=>'user/doresetpassword','method'=>'post','class'=>'am-form am-form-horizontal'))}}
    <div class="am-form-group">
      {{Form::label('email','登录邮箱',array('class'=>'am-u-md-3 am-form-label'))}}
      <div class="am-u-md-9">
        {{Form::text('email',Auth::user()->email,array('readonly'=>'readonly'))}}
      </div>
    </div>

    <div class="am-form-group">
      {{Form::label('oldpassword','旧密码',array('class'=>'am-u-md-3 am-form-label'))}}
      <div class="am-u-md-9">
        {{Form::password('oldpassword')}}
      </div>
    </div>

    <div class="am-form-group">
      {{Form::label('password','新密码',array('class'=>'am-u-md-3 am-form-label'))}}
      <div class="am-u-md-9">
        {{Form::password('password')}}
      </div>
    </div>

    <div class="am-form-group">
      {{Form::label('password_confirmation','再次输入新密码',array('class'=>'am-u-md-3 am-form-label'))}}
      <div class="am-u-md-9">
        {{Form::password('password_confirmation')}}
      </div>
    </div>

    <div class="am-form-group">
      <div class="am-u-md-9 am-u-md-offset-3">
        {{Form::submit('修改密码',array('class'=>'am-btn am-btn-primary'))}}
      </div>
    </div>
  {{Form::close()}}
@stop
<!--[if (gte IE 9)|!(IE)]><!-->
@section('js')
    <script type="text/javascript" src="{{URL::asset('user/js/base.js')}}"></script>
@stop